package cn.bdqn.entity;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;

@Data
public class Game extends Model<Game> {
    //游戏ID
    @TableId(type = IdType.AUTO)
    private Integer gameId;
    //游戏名称
    private String gameName;
    //游戏图片
    private String imgUrl;
    //游戏介绍
    private String gameIntro;
    //版本介绍
    private String versionIntro;
    //配置要求
    private String configRequire;
    //游戏类型,外键
    private Integer gameCategoryId;
    //发布日期
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date releaseDate;
    //收藏个数
    private Integer favorCount;
    //浏览次数
    private Integer visitCount;
    //视频链接
    private String videoUrl;
    //下载所需的new币
    private Integer newbee;
    //旧激活码
    private String activeCodeOld;
    //新激活码
    private String activeCodeNew;
    //销量
    private Integer salesVolume;
    //下载量
    private Integer downloadVolume;
    //最后更新
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date lastUpdate;
    //有效日期
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date validityDate;
    @Override
    protected Serializable pkVal() {
        return this.gameId;
    }
    }

